/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Logico;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author usuario
 */
@Embeddable
public class DeportistaCompetenciaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idcompetencia")
    private int idcompetencia;
    @Basic(optional = false)
    @Column(name = "iddeportista")
    private int iddeportista;
    @Basic(optional = false)
    @Column(name = "fase")
    private String fase;

    public DeportistaCompetenciaPK() {
    }

    public DeportistaCompetenciaPK(int idcompetencia, int iddeportista, String fase) {
        this.idcompetencia = idcompetencia;
        this.iddeportista = iddeportista;
        this.fase = fase;
    }

    public int getIdcompetencia() {
        return idcompetencia;
    }

    public void setIdcompetencia(int idcompetencia) {
        this.idcompetencia = idcompetencia;
    }

    public int getIddeportista() {
        return iddeportista;
    }

    public void setIddeportista(int iddeportista) {
        this.iddeportista = iddeportista;
    }

    public String getFase() {
        return fase;
    }

    public void setFase(String fase) {
        this.fase = fase;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idcompetencia;
        hash += (int) iddeportista;
        hash += (fase != null ? fase.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DeportistaCompetenciaPK)) {
            return false;
        }
        DeportistaCompetenciaPK other = (DeportistaCompetenciaPK) object;
        if (this.idcompetencia != other.idcompetencia) {
            return false;
        }
        if (this.iddeportista != other.iddeportista) {
            return false;
        }
        if ((this.fase == null && other.fase != null) || (this.fase != null && !this.fase.equals(other.fase))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Logico.DeportistaCompetenciaPK[ idcompetencia=" + idcompetencia + ", iddeportista=" + iddeportista + ", fase=" + fase + " ]";
    }
    
}
